<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAddressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('addresses', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('地区名称');
            $table->bigInteger('parent')->default(0)->comment('为0为省份');
            $table->string('short_name')->comment('简称');
            $table->string('city_code')->comment('城市区号');
            $table->string('zipcode')->comment('邮编');
            $table->string('lng')->comment('经度');
            $table->string('lat')->comment('纬度');
            $table->string('pinyin')->comment('拼音');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('addresses');
    }
}
